local mode = "hard";

function AutoNormal_OnEvent(this,event)
	local party = GetNumPartyMembers() >= 2
	
	if event == "PARTY_MEMBER_CHANGED" or event == "PARTY_LEADER_CHANGED" or event == "ZONE_CHANGED" then
		if GetInstanceLevel() ~= mode then
			SetInstanceLevel(mode)
		end
	end
end

function AutoNormal_OnLoad(this)
	this:RegisterEvent("PARTY_MEMBER_CHANGED");
	this:RegisterEvent("PARTY_LEADER_CHANGED");
	this:RegisterEvent("ZONE_CHANGED");
	DEFAULT_CHAT_FRAME:AddMessage("Addon |cff00ff00 AutoNormal loaded.");	
end

function AutoNormal()
	if (mode == "easy") then
		mode = "normal"
		SendSystemMsg("|H|h|cff00FF00NORMAL MOD|h")
	elseif (mode == "normal") then
		mode = "hard"
		SendSystemMsg("|H|h|cffFF0000HARD MOD|h")
	elseif (mode == "hard") then
		mode = "easy"
		SendSystemMsg("|H|h|cffFFFFFFEASY MOD|h")
	end
end


SLASH_XNorm1 = "/normal";
SlashCmdList["XNorm"] = AutoNormal_normal;
